<template>
  <!-- 操作日志 -->
  <div class="page">
    <el-card class="card">
      <el-row class="card-content">
        <!--    搜索-->
        <el-col :span="24" class="search-wrapper">
          <search :search-items="searchItems" @on-search="searchBySearchItem"></search>
        </el-col>
        <!--    表格-->
        <el-col :span="24" class="data">
          <el-table :data="data" stripe>
            <el-table-column prop="ip" label="IP地址" align="center"></el-table-column>
            <el-table-column prop="operationModule" label="操作模块" align="center"></el-table-column>
            <el-table-column prop="occurrenceTime" label="发生时间" align="center"></el-table-column>
            <el-table-column prop="OperatingContent" label="操作内容" align="center"></el-table-column>
          </el-table>
          <div class="pager-group">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="page"
              :page-sizes="[10, 20, 30, 40]"
              :page-size="pageSize"
              layout="total, sizes, jumper, prev, next"
              :total="total"
            ></el-pagination>
          </div>
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script>
import Search from '@/framework/components/search'
import PageMixin from '@/framework/mixins/pageMixin'
export default {
  name: "operation",
  mixins: [
    PageMixin,
    // Normalize(search, count)
  ],
  data(){
    return{
      searchItems: [
        {
          name: 'IP地址',
          key: 'ip',
          type: 'string'
        },
        {
          name: '发生时间',
          key: 'time',
          type: 'daterange',
        }
      ],
      data:[
        {ip:'192.168.32.16',operationModule:'直播管理',occurrenceTime:'2022-1-23 13:23',OperatingContent:'修改直播间“纺织直播”'},
        {ip:'192.168.89.10',operationModule:'主播管理',occurrenceTime:'2022-1-16 11:15',OperatingContent:'添加主播"张飞"'},
        {ip:'192.168.154.16',operationModule:'短视频管理',occurrenceTime:'2022-1-20 15:19',OperatingContent:'删除短视频"今天是个好日子"'},
        {ip:'192.168.12.26',operationModule:'短视频管理',occurrenceTime:'2022-1-29 20:23',OperatingContent:'下架短视频"今天是个好日子"'},
        {ip:'192.168.78.36',operationModule:'直播回放管理',occurrenceTime:'2022-1-12 18:33',OperatingContent:'上架直播回放"直播标题"'},
      ],
      // page:1,
      // pageSize:0,
      // total:0,
    }
  },
  components: { Search },
  methods:{
    //条件搜索
    searchBySearchItem(){

    },
  },
}
</script>

<style lang="less" scoped>
.data{
  margin-top: 10px;

  .pager-group{
    width:100%;
    margin: 20px 0;
  }
}

.instructions{
  margin-top:30px;

  .instructions-title{
    font-size: 20px;
  }

  .instructions-item{
    font-size: 13px;
    margin-top:8px;
    font-weight: 800;
  }
}
</style>
